#define _CRT_SECURE_NO_WARNINGS 1
#include<stdlib.h>

int cal(int* p, int n)
{
	if (n == 1)
	{
		return *p;
	}
	else
	{
		return *p + cal((p + 1), n - 1);
	}

}
int main()
{
	int i = 0;
	scanf("%d", &i);
	int* p = (int*)malloc(i * sizeof(int));
	for (int j = 0; j < i; j++)
	{
		scanf("%d", (p + j));
	}int ret = cal(p, i);
	printf("%d", ret);
	return 0;
}
